home *** CD-ROM | disk | FTP | other *** search
- property ancestor, fRoomName
- global kRoomNames, gApp
-
- on birth me, vSprNum, vID
- set ancestor to NewObj("TAnim", vSprNum, vID)
- mIRoomIcon(me)
- return me
- end
-
- on mIRoomIcon me
- mInvisible(me)
- set aHiliteCastName to mGtID(me) & "A"
- set the castNum of sprite mGtSprNum(me) to the number of cast aHiliteCastName
- updateStage()
- mStRoomName(me, EMPTY)
- end
-
- on mDeath me
- mVisible(me)
- end
-
- on mStRoomName me, vRoomName
- set fRoomName to vRoomName
- end
-
- on mGtRoomName me
- return fRoomName
- end
-
- on mComplete me
- mStCastNum(me, the number of cast (fRoomName & "IconCmp"))
- end
-
- on mEnterMouse me
- mVisible(me)
- updateStage()
- end
-
- on mLeaveMouse me
- mInvisible(me)
- updateStage()
- end
-
- on mMouseUp me
- if mGtCurRoomName(mGtSupervisor(me)) <> mGtRoomName(me) then
- mStCurRoomName(mGtSupervisor(me), mGtRoomName(me))
- stpSnd(1)
- stpSnd(2)
- set aRoomNum to getPos(kRoomNames, mGtRoomName(me))
- if aRoomNum = 1 then
- set the volume of sound 2 to 100
- else
- if aRoomNum = 2 then
- set the volume of sound 2 to 200
- else
- if aRoomNum = 3 then
- set the volume of sound 2 to 130
- else
- set the volume of sound 2 to 200
- end if
- end if
- end if
- hideNavigator()
- set the puppet of sprite 24 to 1
- set the locH of sprite 24 to -1000
- updateStage()
- set the puppet of sprite 24 to 0
- mNewMainLayer(gApp, "TCkrchLayer", mGtRoomName(me))
- else
- hideNavigator()
- end if
- end
-